package com.cysyz.web.action
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionMapping
import org.apache.struts.action.ActionForm
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse
import org.springframework.stereotype.Controller
import com.cysyz.web.form.TypeForm
import javax.annotation.Resource
import com.cysyz.dao.BaseDao
import com.cysyz.entity.product.ProductType

@Controller("/control/producttype/list")
public class TypeAction extends Action{
	@Resource BaseDao dao
	override execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
		super.execute(mapping, form, request, response)
		var typeForm = form as TypeForm
		
		request.setAttribute("pageResult", dao.listPaging(typeof(ProductType), typeForm.page, 12))
		return mapping.findForward("list")
	}
	
}
